<h1><a id="SpecialUtilities">Special Utilities</a></h1>

<p>Any of these programs should only be run by the individual in the business who is allocated the task of administering the system, who has a thorough understanding of the system. If in doubt seek advice. Many of these utilities perform major changes to the database and it is always advisable to have a backup before attempting to run one. All these utilities have a page security setting of 15 by default (see security schema).</p>

<p>The Utility menu is a separate module so access can be turned off to hide these utility script links by turning off the Utilities module in user settings. All utlity pages are prefixed with a Z_.</p>

<h2><a id="Z_ChangeCustomerCode">Change A Customer Code</a></h2>

<p>This page requires the entry of an existing customer code and the new customer code. The system checks to see the new code entered doesn't already exist and that the code entered for the existing customer does exist. If all is well then the customer code data is changed in all tables throughout the system that refer to the customer code.</p>

<p><b>WARNING</b>: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.</p>

<h2><a id="Z_ChangeBranchCode">Change A Customer Branch Code</a></h2>

<p>.</p>

<p><b>WARNING</b>: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.</p>

<h2><a id="Z_ChangeSupplierCode">Change A Supplier Code</a></h2>

<p>.</p>

<p><b>WARNING</b>: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.</p>

<h2><a id="Z_ChangeStockCategory">Change A Stock Category Code</a></h2>

<p>.</p>

<p><b>WARNING</b>: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.</p>

<h2><a id="Z_ChangeStockCode">Change An Inventory Item Code</a></h2>

<p>This page requires the entry of an existing stock code and the new stock code. The system checks to see the new code entered doesn&apos;t already exist and that the code entered for the existing item does exist. If all is well then the stock code data is changed in all tables through-out the system. Sales analysis, stock movements, stock locations, Bills of Material, parent and component items, sales order details and purchase order details as well as the Stock Master, pricing and shipment charges.</p>

<p><b>WARNING</b>: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.</p>

<h2><a id="Z_ChangeGLAccountCode">Change A GL Account Code</a></h2>

<p>.</p>

<p><b>WARNING</b>: Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours when others are using the system.</p>

<h2><a id="Z_ChangeLocationCode">Change A Location Code</a></h2>

<p>.</p>

<h2><a id="Z_TranslateItemDescriptions">Translate Item Descriptions</a></h2>

<p>This utility uses the Google Translator API to automatically translate item descriptions (short and long part descriptions).</p>

<p>It translates from the item description in the default language (It was set up in $DefaultLanguage in config) to the languages to maintain translations for item descriptions (They were set up in <u>Main Menu</u> &gt; <u>Setup</u> &gt; General Setup Options  &gt; <u>System Parameters</u> &gt; General Settings). It only translates descriptions of items that are current (stockmaster.discontinued=0).</p>

<p>It requieres a Google Translator API Key (more info in <a href="https://cloud.google.com/translate/" target="_blank">https://cloud.google.com/translate/</a>) to allow automatic translations.</p>

<p>See also: In <a href="ManualContents.php?ViewTopic=Inventory">Inventory (aka "Stock")</a>, <a href="ManualContents.php?ViewTopic=Inventory#ReviewTranslatedDescriptions">Review Translated Descriptions</a>.</p>

<h2><a id="Z_BottomUpCosts">Update costs for all BOM items, from the bottom up</a></h2>

<p>.</p>

<h2><a id="Z_ReApplyCostToSA">Re-apply costs to Sales Analysis</a></h2>

<p>This utility allows a period to be selected for which the current standard cost is applied to the quantities recorded in the sales analysis as sold to re-calculate the cost of goods sold.</p>

<p>It is important to realise that this will destroy the integrity of the matching general ledger journals created at the time of invoicing and that the GL cost of sales will no longer match with the sales analysis cost of sales.</p>

<p>However, occasionally incorrect cost data that has made a monkey of the sales analysis and general ledger can only be rectified by running this utility.</p>

<h2><a id="Z_GLAccountUsersCopyAuthority">Copy Authority of GL Accounts from one user to another</a></h2>

<p>This utility allows you to the copy access rights to general ledger accounts from one user to another. This utility overwrites all the access rights of the destination user.</p>

<p>If you need to change a specific GL account access permissions for users, see: <a href="ManualContents.php?ViewTopic=GeneralLedger#GLAccountUsers">GL Account Authorised Users</a>.</p>

<p>If you need to change a specific user access permissions to GL accounts, see: <a href="ManualContents.php?ViewTopic=GeneralLedger#UserGLAccounts">User Authorised GL Accounts</a>.</p>


<!-- "Inquiries and Reports" -->


<h2><a id="Z_CurrencyDebtorsBalances.php">Debtors Balances By Currency Totals</a></h2>

<p>This script is an utility to show debtors balances in total by currency.</p>

<h2><a id="Z_CurrencySuppliersBalances.php">Suppliers Balances By Currency Totals</a></h2>

<p>This script is an utility to show suppliers balances in total by currency.</p>


<h2>Make Stock Locations</h2>

<p>If the inventory database is imported from some other system, the stock location records can be created for all locations currently defined by running the script Z_MakeStockLocns.php. Inventory items will not appear on searches during entry of sales orders until their corresponding inventory locations records exist.</p>

<p></p>

<h2>Repost General Ledger from Period</h2>

<p>This script Z_RePostGLFromPeriod.php clears the actual data in the table ChartDetails - that contains the movements in each GL account, the movements are then re-calculated by setting all GLTrans to unposted and re-running the posting of all these transactions. This is a desperate measure that should only be undertaken in an extreme situation. Maybe a corrupt database or system crash etc that caused an out of balance trial balance.</p>

<h2><a id="Z_poAdmin">Maintain Language Files</a></h2>

<p>We use <b>gettext</b> as the internationalization and localization (i18n) system to write a multilingual program. The most commonly used implementation of gettext is GNU gettext, released by the GNU Project in 1995 as a free software implementation of the system.</p>

<p>Source code is first modified to use the GNU gettext calls. This is done by wrapping strings that the user will see in the gettext function. To save typing time, and to reduce code clutter, this function is commonly aliased to _, so that the PHP code:</p>

<div class="centre">
	<pre>echo <b>gettext</b>('<i>Maintain Language Files</i>');</pre>
</div>

<p>would become:</p>

<div class="centre">
	<pre>echo <b>_</b>('<i>Maintain Language Files</i>');</pre>
</div>

<p>Comments (starting with <b>///</b>) placed directly before strings thus marked are made available as hints to translators by helper programs.</p>

<!--
To do: Add more information about the translation workflow. e.g. "This script should be run by developers when there are changes in the strings that the user will see."
-->

<h3><a id="Z_poRebuildDefault">Rebuild the System Default Language File</a></h3>

<p>This script <b>Z_poRebuildDefault.php</b> runs <b>xgettext</b> on the sources to produce a .pot (<i><b>P</b>ortable <b>O</b>bject <b>T</b>emplate</i>) file, which contains a list of all the translatable strings extracted from the sources. The resultant system default language file (.pot file) is saved in the <b>.../locale/en_GB.utf8/LC_MESSAGES/messages.po</b> path.</p>

<h3><a id="Z_poAddLanguage">Add a New Language to the System</a></h3>

<p>This script <b>Z_poAddLanguage.php</b> adds a new language to the system, by creating a new language file (.po file) from the system default language file (.pot file).</p>

<p>.</p><!-- To do: Add more information about this script. e.g. "This script should be run by developers when..."-->

<h3><a id="Z_poEditLangHeader">Edit a Language File Header</a></h3>

<p>.</p><!-- To do: Add more information about this script. e.g. "This script should be run by developers when..."-->

<h3><a id="Z_poEditLangModule">Edit a Language File Module</a></h3>

<p>.</p><!-- To do: Add more information about this script. e.g. "This script should be run by developers when..."-->

<h3><a id="Z_poEditLangRemaining">Edit Remaining Strings For This Language</a></h3>

<p>.</p><!-- To do: Add more information about this script. e.g. "This script should be run by developers when..."-->

<h3><a id="Z_poDownloadPoFile">Download messages.po file</a></h3>

<p>.</p><!-- To do: Add more information about this script. e.g. "This script should be run by developers when..."-->

<h3><a id="Z_poDownloadMoFile">Download messages.mo file</a></h3>

<p>.</p><!-- To do: Add more information about this script. e.g. "This script should be run by developers when..."-->
